-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Functional #189
base: main
Are you sure you want to change the base?
Functional #189
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #189 +/- ##
=======================================
- Coverage 80.6% 79.6% -1.0%
=======================================
Files 42 45 +3
Lines 4277 4644 +367
=======================================
+ Hits 3447 3695 +248
- Misses 830 949 +119
|
klassname = klass.__name__ | ||
name = klass.__name__.lower() | ||
if klassname == "LOSH": | ||
defn = f"def {name}(*args, **kwargs):\n\tobj = {klassname}(*args, **kwargs)\n\treturn obj._statistic, obj.pval" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These have to separate the init and fit phases, so I need to figure out how to re-write the signature so that the options all go through.
This is a bit of metaprogramming that re-rexpresses most of the esda stats classes as functions that just return the statistic and a simulated p-value.
Still needs work with the LOSH and Spatial_Pearson statistics, but this is one of the two APIs I think we should adopt. The other is the LOSH/Spatial_Pearson-style sklearn estimator.